<template>
    <div class="personal-center">
        <personal-information :src="userInfo.pic" :name="userInfo.realname" :address="userInfo.address"/>
        <div class="nav-menu-button bottom-ash-line">
            <title-normal title="我的订单" tip="" class="header" :route="routeOption"/>
            <nav-group-normal :dataset="navButtonGroup" class="body"/>
        </div>
        <operation src="salesman.png" path="/GeneralRepository/order-shop" title="暂存点管理"/>
        <operation src="salesman.png" path="/GeneralRepository/order-myshop" title="我服务的门店"/>
        <operation src="stock-control.png" path="/GeneralRepository/add-temp" title="添加暂存点"/>
        <operation src="stock-control.png" path="/GeneralRepository/type-manage" title="分类管理"/>
        <operation src="stock-control.png" path="/public/tray-manage" title="托盘管理"/>
        <operation src="stock-control.png" path="/GeneralRepository/kucun-manage" title="库存报表"/>
        <operation src="clock.png" path="/public/message-list" title="消息通知"/>
        <operation src="setting.png" path="/public/securitySettings" title="安全设置"/>
        <operation src="setting.png" path="/GeneralRepository/general-integral-list" title="积分商城"/>
        <operation src="setting.png" path="/GeneralRepository/general-await-order-list" title="积分订单确认"/>
        <tab-group :dataset="navButtonTab" identity="4" :index="3"></tab-group>
    </div>
</template>

<script>
    import PersonalInformation from '../../components/currency/personal/information.vue';
    import Operation from '../../components/currency/personal/operation.vue';
    import TabGroup from "../../components/currency/tab/tab.vue";
    import NavGroupNormal from '../../components/currency/nav-group/normal.vue';
    import TitleNormal from '../../components/currency/title/normal.vue';

    export default {
        name: "GeneralRepositoryUser",
        components: {
            PersonalInformation,
            Operation, TabGroup, NavGroupNormal, TitleNormal
        },
        data() {
            return {
                navButtonGroup: [
                    {
                        name: "待上交", route: {
                            path: '/GeneralRepository/order-listing',
                            data: {
                                index: 0
                            }
                        }
                    },
                    {
                        name: "待确认", route: {
                            path: '/GeneralRepository/order-listing',
                            data: {
                                index: 1
                            }
                        }
                    },
                    {
                        name: "已上交", route: {
                            path: '/GeneralRepository/order-listing',
                            data: {
                                index: 2
                            }
                        }
                    },
                    {
                        name: "已取消", route: {
                            path: '/GeneralRepository/order-listing',
                            data: {
                                index: 3
                            }
                        }
                    }
                ],
                navButtonTab: [
                    {
                        name: "暂存点订单", route: {path: '/GeneralRepository/index'}
                    },
                    {
                        name: "待取", route: {path: '/GeneralRepository/waiting-point-map'}
                    },
                    {
                        name: "查询报价", route: {path: '/GeneralRepository/enquiry-quotation'}
                    },
                    {
                        name: "个人中心", route: {path: '/GeneralRepository/personal-center'}
                    }
                ],
                routeOption: {path: '/GeneralRepository/order-listing', data: {index:0}}
            }
        },
        computed: {
            userInfo() {
                return this.$store.state.options.user.oda
            }
        },
        methods: {
            goList() {
                this.$router.push({
                    path: '/GeneralRepository/order-listing?index=0'
                })
            }
        }
    }
</script>

<style lang="scss" scoped>
    .personal-center {
        .nav-menu-button {
            padding: 1rem;

            .header {
                margin-top: 0.2rem;
                padding-bottom: 1.3rem;
                border-bottom: 0.1rem solid #eeeeee;
            }

            .body {
                margin: 2rem 0rem 1.6rem;
            }
        }
    }
</style>
